unit DH;
{
    Copyright 2008, travieorama@googlemail.com

    This file is part of the taviesadora project

    taviesadora is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    taviesadora is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.


}
interface                              
  //procedure HelloWorld; stdcall; external 'dh.dll';
procedure DH_InitDLL(Rand: PByte; randSize:integer);    cdecl;              external 'dh.dll';

function DH_NewSession (MyPubKey: PByte; var PubBufSize:integer;
                        p:PByte; var pBufSize:integer;
                        g:PByte; var gBufSize:integer;
                        KeySize:integer;PrefID:integer
                        ):integer;      cdecl;   external 'dh.dll';



function DH_ComputeKey (SessionID:integer;
                      PartnerPubKey:PByte;
                      PartnerKeySize:integer;
                      ResultKey:PByte;
                      var ResultKeyBufSize:integer ):integer cdecl;   external 'dh.dll';

procedure DH_CloseSession(SessionID:integer)    cdecl; external 'dh.dll';

function DH_TestParam (var a:integer; b:integer):integer; cdecl; external 'dh.dll';{}

implementation


end.
